<template>
  <view>
    <into-back></into-back>
    <view class="center-box">
      <view class="img">
        <kt-image
            class="img-img"
            border-radius="20rpx"
            mode="widthFix"
            :src="$kt.file.byPath('image/logo.png')"></kt-image>
      </view>
    </view>

  </view>
</template>

<script>
import IntoBack from "./components/IntoBack.vue";

export default {
  components: {
    IntoBack
  },
  data() {
    return {
      isHasBack: false
    };
  },
  onLoad(options) {
  },
  mounted() {
    // 获取该页面所有参数
    let pages = getCurrentPages();
    // 获取当前页面
    let currentPage = pages[pages.length - 1];
    let options = currentPage.options;

    console.log(JSON.stringify(options))
    this.toTo()
    // 判断是否参数是否有重定向
    if (options?.redirect) {
      // 跳转到指定页面
      uni.redirectTo({
        url: options.redirect
      })
    } else {
      // 跳转到指定页面
      uni.redirectTo({
        url: "/pages/body/body"
      })
    }
  },
  onShow() {

  },
  methods: {
    async toTo(){
      await this.$i18n.loadingLocalized();
      // this.$i18n.setLanguageCode("ar")
      await this.$i18n.loadLanguage("appFront", "en");
      await this.$i18n.loadLanguage("appFront", "zh_CN");
      await this.$i18n.loadLanguage("appFront");
    }
  }
}
</script>

<style lang="scss" scoped>
.bottom {
  position: fixed;
  left: 0;
  bottom: 0;
  font-size: 30rpx;
  z-index: 999;
  color: #000000;
  width: 100%;
  text-align: center;
  padding: 20rpx 60rpx 20rpx 60rpx;
  box-sizing: border-box;

  .progress-box {
    width: 80%;
    height: 20rpx;
    //color: #FFFFFF;
    color: #000000;
    left: 0;
    background-color: #f2f2f2;
    //background-color: rgba(0, 0, 0, .8);
    border: 1px solid #FFFFFF;
    border-radius: 12rpx;
    margin-top: 10rpx;

    .progress {
      width: 0%;
      height: 100%;
      background-color: #000000;
      //background-color: rgba(255, 255, 255, .8);
      border-radius: 10rpx;
    }
  }
}

.progress-text {
  //color: #FFFFFF;
  color: #000000;
  font-weight: bold;
}

.center-box {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 999;

  .img {
    width: 400rpx;
    height: 400rpx;
    // 动画
    animation: into-rotate 2s linear infinite;
  }
}

@keyframes into-rotate {
  0% {
    opacity: 1;
  }
  25% {
    opacity: 0.8;
  }
  50% {
    opacity: 1;
  }
  75% {
    opacity: 0.8;
  }
  100% {
    opacity: 1;
  }
}

.progress-text-2 {
  color: rgba(255, 255, 255, .7)
}


</style>
